package myApp.KnorrAndroid.common;

import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;

public class KnorrInfo extends Application{
	public final String VERSION = "1.1";
	public final String PLATFORM_SDK_STRING = android.os.Build.VERSION.SDK;
	public final String PHONE_MODEL = "Android_" + android.os.Build.MODEL;
	
	Context appContext;//application context
	Context activityContext; //activity context
	private static KnorrInfo instance = null;
	KnorrProfile profile = new KnorrProfile();
	Bitmap bmpData = null;// bitmap tam luu tru de gui len server khi dinh kem hinh anh
	boolean isDebugMode = false;
	
	public KnorrInfo(){
	}
	
	public static KnorrInfo getInstance(){
		if(instance == null){
			instance = new KnorrInfo();
		}
		return instance;
	}
	
	public Context getAppContext(){
		return this.appContext;
	}
	
	public Context getActivityContext(){
		return activityContext;
	}
	
	public void setActivityContext(Context context) {
		this.activityContext = context;

	}
	
	public void setAppContext(Context context){
		this.appContext = context;
	}
	
	public KnorrProfile getProfile(){
		if(profile == null){
			profile = new KnorrProfile();
		}
		return profile;
	}
	
	public void setDebugMode(boolean isDebug){
		isDebugMode = isDebug;
	}
	
	public boolean isDebugMode(){
		return isDebugMode;
	}
	
	public void setBitmapData(Bitmap bmp){
		bmpData = bmp;
	}
	
	public Bitmap getBitmapData(){
		return bmpData;
	}
}
